-
Notifications
You must be signed in to change notification settings - Fork 14k
rust-analyzer subtree update
#149265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer subtree update
#149265
Conversation
Supports:
- and <-> and_then
- then_some <-> then
Example
---
```rust
fn foo() {
let foo = Some("foo");
return foo.and$0(Some("bar"));
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
fn foo() {
let foo = Some("foo");
return foo.and_then(|| Some("bar"));
}
```
It cannot be exactly the same, because we have needs rustc doesn't have (namely, accurate enumeration of all methods, not just with a specific name, for completions etc., while rustc also needs a best-effort implementation for diagnostics) but it is closer than the previous impl. In addition we rewrite the closely related handling of operator inference and impl collection. This in turn necessitate changing some other parts of inference in order to retain behavior. As a result, the behavior more closely matches rustc and is also more correct. This fixes 2 type mismatches on self (1 remains) and 4 diagnostics (1 remains), plus some unknown types.
This is required now that we send this clause to the solver.
Example
---
```rust
enum A { $0Foo(u32), Bar$0(i32) }
```
**Before this PR**
```rust
enum A { Foo(u32), Bar(i32) }
impl From<u32> for A {
fn from(v: u32) -> Self {
Self::Foo(v)
}
}
```
**After this PR**
```rust
enum A { Foo(u32), Bar(i32) }
impl From<u32> for A {
fn from(v: u32) -> Self {
Self::Foo(v)
}
}
impl From<i32> for A {
fn from(v: i32) -> Self {
Self::Bar(v)
}
}
```
Example
---
```rust
mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
$0std::fmt::Debug;
let x: std::fmt::Debug = std::fmt::Debug;
}
```
**Before this PR**
```rust
use std::fmt;
mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
fmt::Debug;
let x: fmt::Debug = fmt::Debug;
}
```
**After this PR**
```rust
use std::fmt::Debug;
mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
Debug;
let x: Debug = Debug;
}
```
Like `unsafe(no_mangle)`
Rowan's green nodes are super drop heavy and as lru eviction happens on cancellation this can block for quite some time, especially after cache priming
Example --- ```rust #[no_mangle] static lower_case: () = (); ``` **Before this PR** ```text non_upper_case_globals ``` **After this PR** No diagnostics
perf: Improve start up time
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.14.1...3.14.2) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 3.14.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.1 to 11.1.0. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v11.0.1...v11.1.0) --- updated-dependencies: - dependency-name: glob dependency-version: 11.1.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…incorrect-case Fix hit incorrect_case on no_mangle static items
fix: make visibility diagnostics for fields to correct location
Example
---
viewHir
```rust
fn main() {
let r = &2;
let _ = &mut (*r as i32)
}
```
**Before this PR**
```rust
fn main() {
let r = &2;
let _ = &mut *r as i32;
}
```
**After this PR**
```rust
fn main() {
let r = &2;
let _ = &mut (*r as i32);
}
```
minor: format T_
Implement precedence for print_hir
…yarn/editors/code/glob-11.1.0 Bump glob from 11.0.1 to 11.1.0 in /editors/code
…yarn/editors/code/js-yaml-3.14.2 Bump js-yaml from 3.14.1 to 3.14.2 in /editors/code
Add `unsafe(…)` attribute completion
add semantic tokens for deprecated items
…targets-outside-pkg-root fix: include all target types with paths outside package root
internal: Upgrade rustc crates
…nd-then Fix not applicable on `and` for replace_method_eager_lazy
Example
---
```rust
fn main() { let _ = &raw $0 }
```
**Before this PR**
```text
fn main() fn()
bt u32 u32
kw const
kw const
kw crate::
...
```
**After this PR**
```text
fn main() fn()
bt u32 u32
kw const
kw crate::
...
```
Fix duplicate `const` complete after `raw`
add deprecated semantic token for extern crate shorthand
proc-macro-srv: Reimplement token trees via immutable trees
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
|
This comment has been minimized.
This comment has been minimized.
|
@bors r+ p=1 |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 42ec52b (parent) -> b64df9d (this PR) Test differencesShow 21 test diffsStage 0
Stage 1
Additionally, 3 doctest diffs were found. These are ignored, as they are noisy. Job group index Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard b64df9d1012f2482b54a4d959548cf8fc67e820c --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (b64df9d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 6.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 471.257s -> 470.372s (-0.19%) |
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@cf4b1fa.Created using https://github.com/rust-lang/josh-sync.
r? @ghost